@extends('layout.home.master')
@section('content')
    <div class="col-12">
        <div class="card" data-toggle="lists" data-lists-values="[&quot;name&quot;]">
            <div class="card-header">
                <div class="row align-items-center">
                    <div class="col">
                        <h4 class="card-header-title">
                            动态
                        </h4>
                    </div>
                    <div class="col-auto">
                        <!-- Dropdown -->
                        <div class="dropdown">

                            <!-- Toggle -->
                            <a href="#!" class="small text-muted dropdown-toggle" data-toggle="dropdown">
                                筛选
                            </a>

                            <!-- Menu -->
                            <div class="dropdown-menu">
                                <a class="dropdown-item sort" data-sort="name" href="#!">
                                    全部
                                </a>
                                <a class="dropdown-item sort" data-sort="name" href="#!">
                                    精华
                                </a>
                            </div>

                        </div>

                    </div>
                    <div class="col-auto">

                        <!-- Button -->
                        <a href="#!" class="btn btn-sm btn-primary">
                            发表
                        </a>

                    </div>
                </div> <!-- / .row -->
            </div>

            <div class="card-body">

                <!-- List -->
                <ul class="list-group list-group-lg list-group-flush list my--4">
                    @foreach($actives as $active)
                        @switch($active->log_name)
                            @case('comment')
                            @include('layout.actives.active_comment')
                            @break;
                            @case('article')
                            @include('layout.actives.active_article')
                            @break;
                            @case('topic')
                            @include('layout.actives.active_topic')
                            @break;
                            @case('lesson')
                            @include('layout.actives.active_lesson')
                            @break;
                        @endswitch
                    @endforeach
                </ul>

            </div>
        </div>
        {{$actives->links()}}
    </div>
    @endsection
